package com.dlyk.controller;

import com.dlyk.query.ActivityRemarkQuery;
import com.dlyk.result.R;
import com.dlyk.service.ActivityRemarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class ActivityRemarkController {

    @Autowired
    private ActivityRemarkService activityRemarkService;

    /**
     * 提交市场活动备注信息
     * @param activityRemarkQuery
     * @return
     */
    @PostMapping("/api/activity/remark")
    public R addActivityRemark(@RequestBody ActivityRemarkQuery activityRemarkQuery,@RequestHeader("Authorization") String token){
        activityRemarkQuery.setToken(token);
        int save=activityRemarkService.saveActivityRemark(activityRemarkQuery);
        return save>0 ? R.OK(save):R.FAIL();
    }
}
